//全部状态
import React, {Component} from 'react';
import {
    View,
} from 'react-native';

import {managestate_Style as styles} from '../../../styles';

var Dimensions = require('Dimensions');
var width = Dimensions.get('window').width;
var height = Dimensions.get('window').height;
import Cmanageres_wei from './cmanageres_wei';
import Cmanageres_cha from './cmanageres_cha';
import Cmanageres_bupei from './cmanageres_bupei';
import Cmanageres_mian from './cmanageres_mian';


export default class Cmanageres_state extends Component {

    constructor(props) {            //构造器只执行一次
        super(props);
    };

    render() {
        return (
            <View style={styles.mesta_list}>
                {this.props.postionSend.sendState == 0 ?
                    <Cmanageres_wei
                        postionSend={this.props.postionSend}/> :
                    this.props.postionSend.sendState == 1 ?
                        <Cmanageres_cha
                            postionSend={this.props.postionSend}
                        /> :
                        this.props.postionSend.sendState == 3 ?
                            <Cmanageres_bupei
                                postionSendMsg={this.props.postionSendMsg}
                                postionSend={this.props.postionSend}
                            /> :
                            this.props.postionSend.sendState == 2 ?
                                <Cmanageres_mian
                                    postionSendMsg={this.props.postionSendMsg}
                                    postionSend={this.props.postionSend}
                                /> :
                                null}
            </View>
        )
    }
}
